package com.my.zidingyikongjian.view.one;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.RectF;
import android.view.View;

/**
 * 项目名称：ZiDingYiKongJian
 * 创建人：
 * 创建时间：2018/7/9 17:29
 */

public class ArcView extends View {
    public ArcView(Context context) {
        super(context);
    }

    @Override
    protected void onDraw(Canvas canvas) {
        Paint paint = new Paint();
        paint.setStrokeWidth(5); // 画笔宽度
        paint.setStyle(Paint.Style.STROKE);// 填充描边
        paint.setColor(Color.RED);

        RectF rectF1 = new RectF(100,10,300,100);
        canvas.drawArc(rectF1,0,90,true,paint);

        RectF rectF2 = new RectF(400,10,600,100);
        canvas.drawArc(rectF2,0,90,false,paint);
    }
}
